package com.etime.perfectschool.service.impl;

import com.etime.perfectschool.mapper.FoodPhotoMapper;
import com.etime.perfectschool.pojo.FoodComments;
import com.etime.perfectschool.pojo.FoodPhoto;
import com.etime.perfectschool.service.FoodPhotoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FoodPhotoServiceImpl implements FoodPhotoService {

    @Autowired
    private FoodPhotoMapper foodPhotoMapper;


    @Override
    public List<FoodPhoto> getAllFoodPhotoByfoodId(int foodId) {
        return foodPhotoMapper.getAllFoodPhotoByfoodId(foodId);
    }

    @Override
    public int insertFoodPhoto(FoodPhoto foodPhoto) {
        return foodPhotoMapper.insert(foodPhoto);
    }

    @Override
    public int deleteFoodPhotoById(int foodId) {
        return foodPhotoMapper.deleteFoodPhotoById(foodId);
    }

    @Override
    public boolean updateFoodPhoto(FoodPhoto foodPhoto) {
        return foodPhotoMapper.updateFoodPhoto(foodPhoto);
    }
}
